package com.example.a2306_shop.adapter

import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.example.a2306_shop.R
import com.example.lib_base.entity.CouponEntityItem

class CouponAdapter:BaseQuickAdapter<CouponEntityItem,BaseViewHolder>(R.layout.item_coupon) {
    override fun convert(holder: BaseViewHolder, item: CouponEntityItem) {
        holder.setText(R.id.coupon_amount,"￥${item.money}")
        holder.setText(R.id.coupon_minprice,"满${item.minPrice}元可用")
        if(item.isUse){//已领取未使用
            holder.setText(R.id.coupon_status,"已领取")
        }else{
            holder.setText(R.id.coupon_status,"领取")
        }
    }
}